//---------------------------------------------------------------------------

#ifndef DataBaseH
#define DataBaseH
//---------------------------------------------------------------------------
#include <vcl.h>
#include <list>
#include "CppSQLite3U.h"

struct URLInfo
{
    String fileName;
    String path;
    String url;

};

struct Bookmark
{
    UINT ID;
    URLInfo urlInfo;
};

class DataBase
{
public:
	~DataBase();

    static DataBase* GetCurrentDB();
    void Init();
    void Close();
    void SaveURLInfo(const URLInfo &URL);
    void SaveURLsInfo(const std::list<URLInfo> &URLs);
    void GetBookMarks(std::list<Bookmark> &bookmarks);
    void DeleteBookMarksByID(const std::list<int> &IDList);

private:
	DataBase();

private:
	static DataBase *DB;
    CppSQLite3DB curDB;


};

DataBase* DataBase::DB = NULL;

#endif
